/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Servlets;

import com.sun.grizzly.websockets.WebSocketEngine;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author johnny
 */
@WebServlet(name = "CorreoServlet", urlPatterns = {"/CorreoServlet"}, loadOnStartup=1)
public class CorreoServlet extends HttpServlet {

    private CorreoAplication app;

    @Override
    public void destroy() {
        super.destroy();
        WebSocketEngine.getEngine().unregister(app);
    }

    @Override
    public void init() throws ServletException {
        super.init();
        app = new CorreoAplication();
        WebSocketEngine.getEngine().register(app);
        
                
    }
}
